package cs2114.gCalc;
import java.util.*;

public class Course
{
    private String name;
    private ArrayList<Assignment> assign;

    public Course(String name)
    {
        this.name = name;
        assign = new ArrayList<Assignment>();
    }

    public String getName()
    {
        return name;
    }

    public void setName(String newName)
    {
        name = newName;
    }

    public void addAssignment(Assignment newAssignment)
    {
        assign.add(newAssignment);
    }

    public void removeAssignment(Assignment a)
    {
        assign.remove(a);
    }

    public void removeAssignment(int index)
    {
        assign.remove(index);
    }

    public int getSize()
    {
        return assign.size();
    }

    public Assignment getIndex(int index)
    {
        return assign.get(index);
    }

}
